package tt.dz.entity.system;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.regex.Pattern;

import org.hibernate.annotations.Type;
import org.hibernate.type.descriptor.sql.TinyIntTypeDescriptor;
import tt.dz.entity.base.OmsStoreFile;
import tt.dz.tcp.rpc.ms.client.entity.MasterLoginResult;
import tt.dz.util.annotation.Ignore;
import tt.dz.util.annotation.PrimaryKey;
import tt.dz.util.annotation.Table;

import javax.persistence.Entity;
import javax.persistence.Id;

import javax.persistence.Transient;

/**
 * 管理员
 * <p>
 * 修改时间：2015年12月16日
 * <p>
 * 修改人：pengyu
 * <p>
 * 修改内容：添加注释，主键注解，实现序列化接口，实体类注释
 */

@Entity
@javax.persistence.Table(name="oms_oper_list")
@Table(name="oms_oper_list")
public class OmsOperList implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 113434556567678L;
	
	
	/**主服务器管理员id*/
	private String ms_manager_id;
	@PrimaryKey
	@Id
	private String oper_id;
	private String user_card;//20位用户卡号，操作员则为空。
	private String user_type;//1:操作员；2：企业用户
	private String account;
	private String oper_name;
	private String password;
	/** 0：独立存在(平台管理员)；1：运营商；2：运营商分支机构；3：厂商。 */
	private Integer entity_type;
	/** 归属实体id */
	private String entity_id;
	/** 归属实体名称 */
	private String entity_name;
	private Date create_time;
	private String create_ms_user_id;//建立用户id,必须是主服务器的用户ID
	/** 状态\r\n            0，禁用\r\n            1，启用 */
	private Integer status;
	private String department;
	/** 手机号码 */
	private String phone_no;
	 /** 身份证号 */
	private String id_card;
	 /** 邮箱 */
	private String email;
	  /** 最后登陆时间 */
	private Date last_time;
	/** 公司名 */
	private String company;
	//操作权限：0：所归属实体下所有站；1：特定站；2：所有站（只针对企业用户）
//	@Type(type = "org.hibernate.type.ByteType")
	private Integer auth_range;
	/** 回调url，企业用户专用 */
	private String notify_url;
	
	private Integer valid_flag;

	private Integer pwdchg_ind;
	@Ignore
	@Transient
	private Integer isSupper;
	@Ignore
	@Transient
	private String[] roleId;
	@Ignore
	@Transient
	private String create_oper_id;
	/**
	 * 系统用户涉及到的存储系统文件
	 * 比如用户头像，网站图标等等。
	 */
	@Ignore
	@Transient
	private List<OmsStoreFile> storeFiles;
	@Ignore
	@Transient
	private MasterLoginResult loginResult;
	@Ignore
	@Transient
	private List<String> powerUrls;
	@Ignore
	@Transient
	private String[] storeIds;
	@Ignore
	@Transient
	private List<Pattern> urlPatterns;
	@Ignore
	@Transient
	String token;
	
	
	public OmsOperList() {
		super();
	}
	public OmsOperList(String account) {
		super();
		this.account = account;
	}
	
	
	public String getNotify_url() {
		return notify_url;
	}
	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}
	public void setOper_id(String oper_id){
		this.oper_id=oper_id;
	}
	public String getOper_id(){
		return oper_id;
	}
	public void setAccount(String account){
		this.account=account;
	}
	public String getAccount(){
		return account;
	}
	public void setOper_name(String oper_name){
		this.oper_name=oper_name;
	}
	public String getOper_name(){
		return oper_name;
	}
	public void setPassword(String password){
		this.password=password;
	}
	public String getPassword(){
		return password;
	}
	public void setEntity_type(Integer entity_type){
		this.entity_type=entity_type;
	}
	public Integer getEntity_type(){
		return entity_type;
	}
	public void setEntity_id(String entity_id){
		this.entity_id=entity_id;
	}
	public String getEntity_id(){
		return entity_id;
	}
	public void setCreate_time(Date create_time){
		this.create_time=create_time;
	}
	public Date getCreate_time(){
		return create_time;
	}
	public void setStatus(Integer status){
		this.status=status;
	}
	public Integer getStatus(){
		return status;
	}
	public void setDepartment(String department){
		this.department=department;
	}
	public String getDepartment(){
		return department;
	}
	public void setPhone_no(String phone_no){
		this.phone_no=phone_no;
	}
	public String getPhone_no(){
		return phone_no;
	}
	public void setId_card(String id_card){
		this.id_card=id_card;
	}
	public String getId_card(){
		return id_card;
	}
	public void setEmail(String email){
		this.email=email;
	}
	public String getEmail(){
		return email;
	}
	public void setLast_time(Date last_time){
		this.last_time=last_time;
	}
	public Date getLast_time(){
		return last_time;
	}
	public void setCompany(String company){
		this.company=company;
	}
	public String getCompany(){
		return company;
	}
	public void setAuth_range(Integer auth_range){
		this.auth_range=auth_range;
	}
	public Integer getAuth_range(){
		return auth_range;
	}
	public void setValid_flag(Integer valid_flag){
		this.valid_flag=valid_flag;
	}
	public Integer getValid_flag(){
		return valid_flag;
	}
	public List<OmsStoreFile> getStoreFiles() {
		return storeFiles;
	}
	public void setStoreFiles(List<OmsStoreFile> storeFiles) {
		this.storeFiles = storeFiles;
	}
	public MasterLoginResult getLoginResult() {
		return loginResult;
	}
	public void setLoginResult(MasterLoginResult loginResult) {
		this.loginResult = loginResult;
	}
	public String getMs_manager_id() {
		return ms_manager_id;
	}
	public void setMs_manager_id(String ms_manager_id) {
		this.ms_manager_id = ms_manager_id;
	}
	public String[] getRoleId() {
		return roleId;
	}
	public void setRoleId(String[] roleId) {
		this.roleId = roleId;
	}
	public Integer getIsSupper() {
		return isSupper;
	}
	public List<String> getPowerUrls() {
		return powerUrls;
	}
	public void setPowerUrls(List<String> powerUrls) {
		this.powerUrls = powerUrls;
	}
	public void setIsSupper(Integer isSupper) {
		this.isSupper = isSupper;
	}
	public String getCreate_oper_id() {
		return create_oper_id;
	}
	public void setCreate_oper_id(String create_oper_id) {
		this.create_oper_id = create_oper_id;
	}
	public String[] getStoreIds() {
		return storeIds;
	}
	public void setStoreIds(String[] storeIds) {
		this.storeIds = storeIds;
	}
	public String getEntity_name() {
		return entity_name;
	}
	public void setEntity_name(String entity_name) {
		this.entity_name = entity_name;
	}
	public String getUser_card() {
		return user_card;
	}
	public void setUser_card(String user_card) {
		this.user_card = user_card;
	}
	public String getUser_type() {
		return user_type;
	}
	public void setUser_type(String user_type) {
		this.user_type = user_type;
	}
	public String getCreate_ms_user_id() {
		return create_ms_user_id;
	}
	public void setCreate_ms_user_id(String create_ms_user_id) {
		this.create_ms_user_id = create_ms_user_id;
	}

	public Integer getPwdchg_ind()
	{
		return pwdchg_ind;
	}

	public void setPwdchg_ind(Integer pwdchg_ind)
	{
		this.pwdchg_ind = pwdchg_ind;
	}

	public List<Pattern> getUrlPatterns()
	{
		return urlPatterns;
	}

	public void setUrlPatterns(List<Pattern> urlPatterns)
	{
		this.urlPatterns = urlPatterns;
	}
	public String getToken() {
		return token;
	}
	public void setToken(String token) {
		this.token = token;
	}
	
	
}

